<template>
  <div id="app">
    <w-header 
      :logo='logo' 
      :menuList='menuList' 
      :nowUrl='currentPage'
      ></w-header>
    <router-view/>
    <w-footer></w-footer>
  </div>
</template>

<script>

import WHeader from '@/components/w-header/w-header'
import WFooter from '@/components/w-footer/w-footer'
export default {
  name: 'App',
  components: {
    WHeader,
    WFooter
  },
  data() {
    return {
      logo: 'http://gtxg.gitee.io/xj-jintai/Assets/wty/images/index/LOGO.png',
      menuList:[{
        name: '首页',
        url: '/'
      },
      {
        name: '关于我们',
        url: '/about'
      },
      {
        name: '解决方案',
        url: '/about'
      },
      {
        name: '产品中心',
        url: '/about'
      },
      {
        name: '服务中心',
        url: '/about'
      },
      {
        name: '联系我们',
        url: '/about'
      }
      ],

      currentPage: this.$route.path
    }
  },
  watch: {
    currentPage: function(val) {
            console.info(val)
    },
    $route(to,from){
      this.currentPage = to.path
    }
  },
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  /* margin-top: 60px; */
}
</style>
